﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace Config
{
    public class omplconfig_store:BaseNode
    {
        public omplconfig_store(XmlNode node):base(node)
        {

        }
        //<nIndexHour>0</nIndexHour>
        public int HourInterval
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexHour"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexHour");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexHour"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexDay>0</nIndexDay>
        public int DayInterval
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexDay"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexDay");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexDay"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexWeek>0</nIndexWeek>
        public int WeekInterval
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexWeek"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexWeek");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexWeek"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexMonth>0</nIndexMonth>
        public int MonthInterval
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexMonth"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexMonth");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexMonth"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexYear>0</nIndexYear>
        public int YearInterval
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexYear"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexYear");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexYear"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexBianHe>-1</nIndexBianHe>
        public int IndexBiaHe
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexBianHe"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexBianHe");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexBianHe"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexStore>1</nIndexStore>
        public int Store
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexStore"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexStore");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexStore"));
                Node.InnerText = value.ToString();
            }
        }
        //<nIndexVariableloadDB>1</nIndexVariableloadDB>
        public int LoadDB
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["nIndexVariableloadDB"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("nIndexVariableloadDB");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("nIndexVariableloadDB"));
                Node.InnerText = value.ToString();
            }
        }
        //<strShengJiangSuBeg>500</strShengJiangSuBeg>
        public int StartSpeed
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["strShengJiangSuBeg"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("strShengJiangSuBeg");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("strShengJiangSuBeg"));
                Node.InnerText = value.ToString();
            }
        }
        //<strShengJiangSuEnd>1000</strShengJiangSuEnd>
        public int StopSpeed
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["strShengJiangSuEnd"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("strShengJiangSuEnd");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("strShengJiangSuEnd"));
                Node.InnerText = value.ToString();
            }
        }
        //<strHeiXiaZiBeg>300</strHeiXiaZiBeg>
        public int BlackBoxSDownLimit
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["strHeiXiaZiBeg"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("strHeiXiaZiBeg");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("strHeiXiaZiBeg"));
                Node.InnerText = value.ToString();
            }
        }
        //<strHeiXiaZiEnd>900</strHeiXiaZiEnd>
        public int BlackBoxUpLimit
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["strHeiXiaZiEnd"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("strHeiXiaZiEnd");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("strHeiXiaZiEnd"));
                Node.InnerText = value.ToString();
            }
        }
        //<strHeiXiaZiSavFre>1</strHeiXiaZiSavFre>
        public int BlackBoxSavFre
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["strHeiXiaZiSavFre"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("strHeiXiaZiSavFre");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("strHeiXiaZiSavFre"));
                Node.InnerText = value.ToString();
            }
        }
        //<STRHeiXiaZiBeforeEvent>0</STRHeiXiaZiBeforeEvent>
        public int BlackboxBeforeEvent
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["STRHeiXiaZiBeforeEvent"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("STRHeiXiaZiBeforeEvent");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("STRHeiXiaZiBeforeEvent"));
                Node.InnerText = value.ToString();
            }
        }
        //<strHeiXiaZiAfterEvent>0</strHeiXiaZiAfterEvent>
        public int BlackboxAfterEvent
        {
            get
            {
                if (_xmlNode == null)
                {
                    return -1;
                }
                return int.Parse(_xmlNode["strHeiXiaZiAfterEvent"].InnerText);
            }
            set
            {
                XmlNode Node = _xmlNode.SelectSingleNode("strHeiXiaZiAfterEvent");
                if (Node == null)
                    Node = _xmlNode.AppendChild(_xmlNode.OwnerDocument.CreateElement("strHeiXiaZiAfterEvent"));
                Node.InnerText = value.ToString();
            }
        }
    }
}
